-# 
-# This file is the sidebar of the page
-#

#modules

  -# Login related modules
  - if session[:user_id] and @user and @user.is_administrator
    = render :partial => "modules/administration"
    = render :partial => "modules/statistics" if APP_SETTINGS[:show_statistics]
  - else
    = render :partial => "modules/login" if APP_SETTINGS[:show_login_module]
    
  = render :partial => "modules/twitter" unless APP_SETTINGS[:twitter_id] == nil
  = render :partial => "modules/flickr" unless APP_SETTINGS[:flickr_id] == nil
  = render :partial => "modules/archives" if APP_SETTINGS[:show_archives]
  = render :partial => "modules/recent_articles" if APP_SETTINGS[:show_recent_articles]
  = render :partial => "modules/tag_cloud" if APP_SETTINGS[:show_tag_cloud]
  = render :partial => "modules/recent_comments" if APP_SETTINGS[:show_recent_comments] and APP_SETTINGS[:comment_system] == "internal"
  = render :partial => "modules/syndication" if APP_SETTINGS[:show_syndication]
  = render :partial => "modules/email_subscription" if APP_SETTINGS[:show_email_subscription]


